<?php
session_start();
include "../../config/koneksi.php";
//include "config/library.php";
include "../../config/fungsi_thumb.php";
include "../../config/fungsi_seo.php";

$module=$_GET[module];
$act=$_GET[act];

// Hapus member
if ($module=='member' AND $act=='hapus'){
  mysql_query("DELETE FROM member WHERE id_member='$_GET[id]'");
  header('location:../../media.php?module='.$module);
}

// Input member
elseif ($module=='member' AND $act=='input'){
  mysql_query("INSERT INTO detail_konsultasi(id_konsultasi, tgl_detail, hasil_konsultasi, 
                                  username) 
	                       VALUES('$_POST[id]', '$tgl_sekarang', '$_POST[hasil_konsultasi]',
                                '$_SESSION[namauser]')");
	mysql_query("UPDATE konsultasi SET status = 'SUDAH DIJAWAB'
                          WHERE id_konsultasi = '$_POST[id]'");
  header('location:../../media.php?module='.$module);
}

// Update member
elseif ($module=='member' AND $act=='update'){
  mysql_query("UPDATE detail_konsultasi SET tgl_detail = '$tgl_sekarang',
                                 hasil_konsultasi   = '$_POST[hasil_konsultasi]'  
                          WHERE id_detail = '$_POST[id]'");
  header('location:../../media.php?module='.$module);
}
?>
